package com.deryun.tyl.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.deryun.tyl.bean.Contact;
import com.deryun.tyl.dao.impl.ContactDaoImpl;

@Service("contactServiceImpl")
public class ContactServiceImpl {
	
	@Resource(name="contactDaoImpl")
	private ContactDaoImpl contactDaoImpl;
	
	public List<Contact> getAllContact(){
		return contactDaoImpl.getAllContact();
	}
	
	public int addContact(Contact contact){
		return contactDaoImpl.addContact(contact);
	}
	
	public int deleteContact(int id){
		return contactDaoImpl.deleteContact(id);
	}
	
	public List<Contact> searchC(String key){
		return contactDaoImpl.searchC(key);
	}
}
